#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int ans = 0;
	while(n)
	{
		int t = n&1;
	//	cout<<t<<endl;
		if(t) ans++;
		n = n>>1;
	}
	cout<<ans<<endl;
}
